Optimal. Leaf size=60 \[ -\frac {(b c-a d) x^n}{d^2 n}+\frac {b x^{2 n}}{2 d n}+\frac {c (b c-a d) \log \left (c+d x^n\right )}{d^3 n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {457, 78}
\begin {gather*} \frac {c (b c-a d) \log \left (c+d x^n\right )}{d^3 n}-\frac {x^n (b c-a d)}{d^2 n}+\frac {b x^{2 n}}{2 d n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 457
Rubi steps
\begin {align*} \int \frac {x^{-1+2 n} \left (a+b x^n\right )}{c+d x^n} \, dx &=\frac {\text {Subst}\left (\int \frac {x (a+b x)}{c+d x} \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \left (\frac {-b c+a d}{d^2}+\frac {b x}{d}+\frac {c (b c-a d)}{d^2 (c+d x)}\right ) \, dx,x,x^n\right )}{n}\\ &=-\frac {(b c-a d) x^n}{d^2 n}+\frac {b x^{2 n}}{2 d n}+\frac {c (b c-a d) \log \left (c+d x^n\right )}{d^3 n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 50, normalized size = 0.83 \begin {gather*} \frac {d x^n \left (-2 b c+2 a d+b d x^n\right )+2 c (b c-a d) \log \left (c+d x^n\right )}{2 d^3 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.36, size = 65, normalized size = 1.08
method | result | size |
norman | \(\frac {\left (a d -b c \right ) {\mathrm e}^{n \ln \left (x \right )}}{d^{2} n}+\frac {b \,{\mathrm e}^{2 n \ln \left (x \right )}}{2 d n}-\frac {c \left (a d -b c \right ) \ln \left (c +d \,{\mathrm e}^{n \ln \left (x \right )}\right )}{d^{3} n}\) | \(65\) |
risch | \(\frac {b \,x^{2 n}}{2 d n}+\frac {x^{n} a}{d n}-\frac {x^{n} b c}{d^{2} n}-\frac {c \ln \left (x^{n}+\frac {c}{d}\right ) a}{d^{2} n}+\frac {c^{2} \ln \left (x^{n}+\frac {c}{d}\right ) b}{d^{3} n}\) | \(81\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 83, normalized size = 1.38 \begin {gather*} a {\left (\frac {x^{n}}{d n} - \frac {c \log \left (\frac {d x^{n} + c}{d}\right )}{d^{2} n}\right )} + \frac {1}{2} \, b {\left (\frac {2 \, c^{2} \log \left (\frac {d x^{n} + c}{d}\right )}{d^{3} n} + \frac {d x^{2 \, n} - 2 \, c x^{n}}{d^{2} n}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 5.15, size = 56, normalized size = 0.93 \begin {gather*} \frac {b d^{2} x^{2 \, n} - 2 \, {\left (b c d - a d^{2}\right )} x^{n} + 2 \, {\left (b c^{2} - a c d\right )} \log \left (d x^{n} + c\right )}{2 \, d^{3} n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 105 vs.
\(2 (48) = 96\).
time = 12.47, size = 105, normalized size = 1.75 \begin {gather*} \begin {cases} \frac {\left (a + b\right ) \log {\left (x \right )}}{c} & \text {for}\: d = 0 \wedge n = 0 \\\frac {\left (a + b\right ) \log {\left (x \right )}}{c + d} & \text {for}\: n = 0 \\\frac {\frac {a x^{2 n}}{2 n} + \frac {b x^{3 n}}{3 n}}{c} & \text {for}\: d = 0 \\- \frac {a c \log {\left (\frac {c}{d} + x^{n} \right )}}{d^{2} n} + \frac {a x^{n}}{d n} + \frac {b c^{2} \log {\left (\frac {c}{d} + x^{n} \right )}}{d^{3} n} - \frac {b c x^{n}}{d^{2} n} + \frac {b x^{2 n}}{2 d n} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {x^{2\,n-1}\,\left (a+b\,x^n\right )}{c+d\,x^n} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________